package com.liuya.safe.model;

import com.liuya.base.BaseModel;

/**
 * Query entitlement rule. Describes
 * {@linkplain com.liuya.safe.model.SafePrivilege}/{@linkplain SafeUserCategory}/
 * {@linkplain SafeQuery} relationship. Unique index( privilegeId, userCategoryId ).
 * For a certain privilage and a certain usercategory, must match only one
 * query.
 */
public class SafeQueryEntitlement extends BaseModel {
	private String userCategoryId;
	private String queryId;
	/**
	 * Privilege Id, must be a leaf node.
	 */
	private String privilegeId;
	private String id;
	private String description;
	private SafeUserCategory userCategory;
	private SafeQuery query;

	public String getUserCategoryId() {
		return userCategoryId;
	}

	public void setUserCategoryId(String userCategoryId) {
		this.userCategoryId = userCategoryId;
	}

	public String getQueryId() {
		return queryId;
	}

	public void setQueryId(String queryId) {
		this.queryId = queryId;
	}

	public String getPrivilegeId() {
		return privilegeId;
	}

	public void setPrivilegeId(String privilegeId) {
		this.privilegeId = privilegeId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public SafeUserCategory getUserCategory() {
		return userCategory;
	}

	public void setUserCategory(SafeUserCategory userCategory) {
		this.userCategory = userCategory;
	}

	public SafeQuery getQuery() {
		return query;
	}

	public void setQuery(SafeQuery query) {
		this.query = query;
	}
}
